import myShop from '../../api/myShop.js'

const state = {
    shopList:[]
}

const actions = {
    getAllProducts({commit}){
        myShop.getMyshop(products => {
            commit('setAllProducts', products)
        })
    },
    addProductToCart(){

    }
}

const mutations = {
    setAllProducts(state, products) {
        state.shopList = products;
    }
}

export default {
    namespaced: true,
    state,
    actions,
    mutations
}